package CollectionTask;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest3 {
    public static void main(String[] args) {
        /*Collection c=new ArrayList();
        Point p=new Point(2,5);
        c.add(p);
        System.out.println(p);
        System.out.println(c);
        p.setX(100);
        System.out.println(p);
        System.out.println(c);*/

        Collection c=new ArrayList();
        Point p=new Point(4,8);
        c.add(p);
        System.out.println(p);
        System.out.println(c);
        p.setX(100);
        p.setY(250);
        System.out.println(p);
        System.out.println(c);
    }
}
